﻿import gs.TweenLite;
import mx.utils.Delegate;
class AS2.BoEV4_Drag {
	// Btn od Effect
	function BoEV4_Drag(btn, act, obj) {
		if (btn.real != null) {
			btn.hitArea = btn.real;
		}
		btn.real._alpha = 0;
		var scope = (obj.scope == null) ? btn : obj.scope;
		if (obj.over != null) {
			btn._onRollOver = Delegate.create(scope, obj.over);
		}
		if (obj.out != null) {
			btn._onRollOut = Delegate.create(scope, obj.out);
		}
		btn.onRollOver = function() {
			this._onRollOver();
			this.gotoAndPlay('s1');
			//showClue1
		};
		btn.onRollOut = btn.onRelease = btn.onReleaseOutside=function () {
			this._onRollOut();
			this.gotoAndPlay('s2');
		}; 
		btn.onPress = function(evt) {
			this.gotoAndPlay('s1');
			act();
		};
		//附加属性
		if (obj != undefined) {
			for (var i in obj) {
				btn[i] = obj[i];
			}
		}
	}
}
